<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.divFrame{width:260px;border:solid 1px #666;font-size:10px;}
	.divTitle{background-color:#eee;padding:5px;}
	.divContent{padding:5px;display:none}
	.divCurrColor{background-color:Red}
	.divDefault{width:260px;font-size:10px;padding:5px;}
	.divClick{width:260px;border:solid 1px #666;font-size:10px;background-color:#eee;padding:5px;}
</style>
<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$(".divTitle").click(function(){
			$(this).addClass("divCurrColor").next(".divContent").css("display","block");
		});
		$(".divDefault").click(function(){
			$(this).toggleClass("divClick").html("点击后的样式");//toggleClass() 对设置或移除被选元素的一个或多个类进行切换。
		});
	});
	
</script>
</head>
<body>
	<div class="divFrame">
		<div class="divTitle">主题</div>
		<div class="divContent">
			<a href="#">One</a>
			<a href="#">Two</a>
			<a href="#">Three</a>
		</div>
	</div>
	<br>
	<div class="divDefault">点击前的样式</div>
</body>
</html>